<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>添加需求</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

<body class="fixed hold-transition skin-blue">
    <div class="wrapper">
        <div th:replace="tophtml::html"></div>
        <div th:replace="left::html"></div>
        <div class="content-wrapper">
            <section class="content-header">
                <h1>
                   <span>添加需求</span>
                   <small>(<span style="color: red">*</span> 为必填项目)</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a th:href="@{/index}"><i class="fa fa-dashboard"></i>用户中心</a></li>
                    <li><a th:href="@{/demand/showQuery}"><i class="fa fa-dashboard"></i>需求管理</a></li>
                    <li><a href="">添加需求</a></li>
                </ol>
            </section>

            <section class="content container-fluid">
                <form id="form1" th:action="@{/demand/add}" method="POST" th:object="${demand}">
                    <div class="form-group">
                        <label>需求名称</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${demandName}"></p>
                        <input type="text" class="form-control" name="demandName" required placeholder="Enter ...">
                    </div>
                    <div class="form-group">
                        <label>需求内容</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${demandContent}"></p>
                        <textarea rows="" cols="" class="form-control" name="demandContent" required placeholder="Enter ..."></textarea>
                    </div>
                    <div class="form-group">
                        <label>需求来源</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${source}"></p>
                        <select class="form-control" name="source">
                            <option th:each="psd : ${projecSourcetDictiontryList}" th:value="${psd.pid}" th:text="${psd.worth}">哈哈</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>来源备注</label>
                        <span style="color: red">(填写客户ID会关联客户)*</span>
                        <p style="color: red;" th:text="${sourceRemark}"></p>
                        <p th:text="${sourceRemark}"></p>
                        <input type="text" class="form-control" name="sourceRemark" placeholder="Enter ...">
                    </div>
                    <div class="form-group">
                        <label>需求状态</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${demandStatus}"></p>
                        <select class="form-control" name="demandStatus">
                            <option th:each="psd : ${demandStatusDictiontryList}" th:value="${psd.pid}" th:text="${psd.worth}">哈哈</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>需求单位</label>
                        <input type="text" class="form-control" name="demandUnit" placeholder="Enter ...">
                    </div>
                    <div class="form-group">
                        <label>需求类型</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${demandType}"></p>
                        <div class="checkbox" th:each="dtd : ${demandTypeDictiontryList}">
                            <label>
                                <input type="checkbox" name="demandType" th:value="${dtd.names}" th:text="${dtd.worth}" required>
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label>所属领域</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${researchField}"></p>
                        <div class="checkbox" th:each="rfd : ${researchFieldDictiontryList}">
                            <label>
                                <input type="checkbox" name="researchField" th:value="${rfd.names}" th:text="${rfd.worth}" required>
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label>国内国外</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${domesticOrForeign}"></p>
                        <div class="radio">
                            <label>
                                <input type="radio" name="domesticOrForeign" id="optionsRadios1" value="0" checked> 国内
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" name="domesticOrForeign" id="optionsRadios2" value="1"> 国外
                            </label>
                        </div>
                    </div>
                    <div class="form-group form-country">
                        <label>国家</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${area}"></p>
                        <select class="form-control form-area">
                            <option value="-1">--选择国家--</option>
                            <option th:each="list:${countryDictiontryList}" th:value="${list.pid}" th:text="${list.worth}"></option>
                        </select>
                    </div>
                    <!-- 选择国内必须选地区 -->
                    <div class="form-group form-area">
                        <label>省</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${area}"></p>
                        <select class="form-control form-area" id="provinceId">
                            <option value="-1">--选择省--</option>
                            <option th:each="list:${provinceDictiontryList}" th:value="${list.names}"  th:text="${list.worth}"></option>
                        </select>
                    </div>
                    <div class="form-group form-area">
                        <label>市</label>
                        <select class="form-control form-area" id="cityId">
                            <option value="-1">--选择市--</option>
                        </select>
                    </div>
                    <div class="form-group form-area">
                        <label>区</label>
                        <select class="form-control form-area" id="areaId">
                            <option value="-1">--选择区--</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>备注1</label>
                        <input type="text" class="form-control" name="remark1" placeholder="Enter ...">
                    </div>
                    <div class="form-group">
                        <label>备注2</label>
                        <input type="text" class="form-control" name="remark2" placeholder="Enter ...">
                    </div>
                    <div class="box-footer">
                        <button type="submit" class="btn btn-primary">提交</button>
                        <button type="reset" class="btn btn-primary" >重置</button>
                        <button type="button" class="btn btn-primary" onclick="window.history.go(-1)">返回</button>
                    </div>
                </form>
            </section>
        </div>
        <!-- Main Footer -->
        <div th:replace="footer::html"></div>
        <div class="control-sidebar-bg"></div>
    </div>
    <div th:replace="bottom::html" ></div>
</body>

</html>